﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AccountingSettings.aspx.cs"
    Inherits="Main_Accounts_AccountingSettings" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/accounts.css" rel="stylesheet" type="text/css" />

    <script src="../../JavaScript/prototype.js" type="text/javascript"></script>

    <script src="../../JavaScript/myTabz.js" type="text/javascript"></script>

    <%--<link rel="stylesheet" type="text/css" href="http://cdn.webrupee.com/font"/>--%>

    <script src="http://cdn.webrupee.com/js" type="text/javascript"></script>

    <script type="text/javascript">
        function isNumberKey(control_id, evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode < 45 || charCode >= 47))
                return false;

            if (charCode == 46) {
                var dotcount = document.getElementById(control_id).value.split('.').length - 1;
                if (dotcount >= 1) {
                    return false;
                }
            }
            return true;
        }
        function GetLastNumber(sText) {
            var Char;
            var lastRow = 0;
            for (i = 0; i < sText.length; i++) {
                Char = sText.charAt(i);
                if (!isNaN(parseFloat(Char))) {
                    lastRow = sText.toString().substr(i);
                    break;
                }
            }
            return lastRow;
        }
        function CurrencySymbol(id) {
            if (id.toString() == 'ddlCurrencyName') {
                if (document.getElementById("ddlCurrencyName").selectedIndex == 0) {
                    document.getElementById("ddlCurrencyDecimal").selectedIndex = 0;
                    document.getElementById("ddlCurrencySymbol").selectedIndex = 0;
                }
                else if (document.getElementById("ddlCurrencyName").selectedIndex == 1) {
                    document.getElementById("ddlCurrencyDecimal").selectedIndex = 1;
                    document.getElementById("ddlCurrencySymbol").selectedIndex = 1;
                }
                else if (document.getElementById("ddlCurrencyName").selectedIndex == 2) {
                    document.getElementById("ddlCurrencyDecimal").selectedIndex = 2;
                    document.getElementById("ddlCurrencySymbol").selectedIndex = 2;
                }
            }
            if (id.toString() == 'ddlCurrencyDecimal') {
                if (document.getElementById("ddlCurrencyDecimal").selectedIndex == 0) {
                    document.getElementById("ddlCurrencyName").selectedIndex = 0;
                    document.getElementById("ddlCurrencySymbol").selectedIndex = 0;
                }
                else if (document.getElementById("ddlCurrencyDecimal").selectedIndex == 1) {
                    document.getElementById("ddlCurrencyName").selectedIndex = 1;
                    document.getElementById("ddlCurrencySymbol").selectedIndex = 1;
                }
                else if (document.getElementById("ddlCurrencyDecimal").selectedIndex == 2) {
                    document.getElementById("ddlCurrencyName").selectedIndex = 2;
                    document.getElementById("ddlCurrencySymbol").selectedIndex = 2;
                }
            }
            if (id.toString() == 'ddlCurrencySymbol') {
                if (document.getElementById("ddlCurrencySymbol").selectedIndex == 0) {
                    document.getElementById("ddlCurrencyName").selectedIndex = 0;
                    document.getElementById("ddlCurrencyDecimal").selectedIndex = 0;
                }
                else if (document.getElementById("ddlCurrencySymbol").selectedIndex == 1) {
                    document.getElementById("ddlCurrencyName").selectedIndex = 1;
                    document.getElementById("ddlCurrencyDecimal").selectedIndex = 1;
                }
                else if (document.getElementById("ddlCurrencySymbol").selectedIndex == 2) {
                    document.getElementById("ddlCurrencyName").selectedIndex = 2;
                    document.getElementById("ddlCurrencyDecimal").selectedIndex = 2;
                }
            }
        }
        var ActivateTabs = function() {
            if (typeof (MT) == 'undefined') {
                var MyTabs = new mt('tabs', 'div.my_tab');
                MyTabs.addTab('TFeature', 'Features');
                MyTabs.addTab('TDispFormat', 'Display Format');
                MyTabs.makeActive('TFeature');
            }
        }
    </script>

    <style type="text/css">
        div#tabs
        {
            width: 700px;
            height:230px;
            margin: 5px auto;
            font-size: 11px;
            border: 1px solid #818181;
        }
        /* DIV that holds each tab*/div.my_tab
        {
            width: 550px;
            margin: 0px auto;
            float: left;
            display: inline;
        }
        /* Title of each tab, used when user don't have Javascript'*/div.my_tab h5
        {
            color: #414141;
            border-bottom: solid 1px #cacaca;
        }
        /* Tab Bar, created via JS*/div#tab-bar
        {
            padding: 10px 0px 10px 0px;
            margin: 0px 10px 10px 0px;
            width: 130px;
            background: #ffffff;
            height:210px;
            border-right: 1px solid #818181;
            margin-bottom: 20px;
            font: normal 12px "Trebuchet MS";
            float: left;
            display: inline;
        }
        /* Single Tab */div#tab-bar div.mt-tab
        {
            width: 110px;
            position: relative;
            text-align: left;
            margin: 4px -1px 0px 0px;
            cursor: pointer;
            border-top: 1px solid #818181;
            border-left: 1px solid #818181;
            border-right: 1px solid #818181;
            border-bottom: 1px solid #818181;
            font: normal 13px "Trebuchet MS";
            float: right;
            display: inline;
            color: #ffffff;
            padding: 5px 5px 5px 10px;
        }
        /* Single Tab, when active */div#tab-bar div.mt-tab-active
        {
            text-align: left;
            margin: 4px -1px 0px 0px;
            cursor: pointer;
            border-top: 1px solid #818181;
            border-left: 1px solid #818181;
            border-right: solid 1px #ffffff;
            border-bottom: 1px solid #818181;
            float: right;
            display: inline;
            color: Black;
            font-weight: bold;
            padding: 5px 5px 5px 10px;
        }
    </style>
</head>
<body onload="ActivateTabs('tabs');">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="divmain" style="clear: both;">
        <acc:heading ID="pagehead" runat="server" HeadingText="Accounting Settings" />
    </div>
    <center>
        <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label>
    </center>
    <div id="tabs">
        <div id="TFeature" class="my_tab">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <div style="margin-top: 2px;">
                        <table style="font-size: 12px; width: 100%" class="tablecontent">
                            <tr>
                                <td class="headtd">
                                    Accounting Option Settings
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="chkAllowSubLedger" runat="server" Text="Allow Sub Accounts Under Ledger" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="chkCostCentre" runat="server" Text="Cost Centre" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <fieldset>
                                        <legend>
                                            <asp:CheckBox ID="chkEnableTDS" runat="server" Text="Enable TDS" /></legend>
                                        <table>
                                            <tr>
                                                <td>
                                                    Round Off TDS Amount to:
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="ddlTdsRoundOff" runat="server" CssClass="dropdown">
                                                        <asp:ListItem Text="Higher Currency Value" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="Nearest Currency Value" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="None (2 Decimals)" Value="2"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <fieldset style="height: 45px; margin-bottom: 10px;">
                                        <legend>
                                            <asp:CheckBox ID="chkAvailST" runat="server" Text="Avail Service Tax Credit" /></legend>
                                        <table>
                                            <tr>
                                                <td>
                                                    Default ST Credit Percentage:
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtSTCredit" runat="server" MaxLength="2" onkeypress="return isNumberKey(this.id,event);"
                                                        Text="0.00" CssClass="inputnumber"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                            </tr>
                        </table>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div id="TDispFormat" class="my_tab">
            <div style="margin-top: 7px;">
                <table style="font-size: 12px; width: 100%">
                    <tr>
                        <td style="width: 100%">
                            <table style="width: 100%" class="tablecontent">
                                <tr>
                                    <td>
                                        Date:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlDateFormat" runat="server" CssClass="dropdown">
                                            <asp:ListItem Text="dd/MM/yyyy" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="MMM/dd/yyyy" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="yyyy/MMM/dd" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Decimal Places:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlDecimalPlaces" runat="server" CssClass="dropdown">
                                            <asp:ListItem Text="0" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                            <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 100%">
                            <table style="width: 100%" class="tablecontent">
                                <tr>
                                    <td colspan="2" class="headtd">
                                        Amount
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:RadioButtonList ID="rbtLargeAmount" runat="server" RepeatDirection="Vertical">
                                            <asp:ListItem Text="Lakhs/Crores" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="Million/Billion" Value="0"></asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                    <td>
                                        <asp:RadioButtonList ID="rbtNagetive" runat="server" RepeatDirection="Vertical">
                                            <asp:ListItem Text="(-)99.99" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="(99.99)" Value="0"></asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 100%">
                            <table style="width: 100%" class="tablecontent">
                                <tr>
                                    <td colspan="6" class="headtd">
                                        Currency
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Name:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCurrencyName" runat="server" onchange="CurrencySymbol(this.id);"
                                            CssClass="dropdown">
                                            <asp:ListItem Text="Rupees" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="Dollar" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="Pound" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Decimal:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCurrencyDecimal" runat="server" onchange="CurrencySymbol(this.id);"
                                            CssClass="dropdown">
                                            <asp:ListItem Text="Paise" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="Cents" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="Pence" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Symbol:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCurrencySymbol" runat="server" onchange="CurrencySymbol(this.id);"
                                            CssClass="dropdown">
                                            <asp:ListItem class="WebRupee" Value="0" Text="Rs."></asp:ListItem>
                                            <asp:ListItem Text="$" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="&#163;" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <br />
    <br />
    <center style="margin-top: 10px;">
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" CssClass="button" />
        <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click"
            CssClass="button" />&nbsp;
    </center>
    </form>
</body>
</html>
